#ifndef BOARD_TYPES_H
#define BOARD_TYPES_H 1
#pragma once

#include "stm32f10x.h"
#include "stdbool.h"

#define XAXIS    0
#define YAXIS    1
#define ZAXIS    2

#define _M_PI 3.1415926535

typedef union
{
    int16_t value;
    uint8_t bytes[2];
} int16andUint8_t;

typedef union
{
    int32_t value;
    uint8_t bytes[4];
} int32andUint8_t;

typedef union
{
    uint16_t value;
    uint8_t bytes[2];
} uint16andUint8_t;

typedef union
{
    float      f_value;
    uint32_t u32_value;
} floatAndUint32_t;


typedef void (* sensorInitFuncPtr)(void);                   // sensor init prototype
typedef void (* sensorReadFuncPtr)(int16_t *data);          // sensor read and align prototype

typedef struct sensor_t
{
    sensorInitFuncPtr init;
    sensorReadFuncPtr read;
    sensorReadFuncPtr align;
    sensorReadFuncPtr temperature;
} sensor_t;










#endif